package com.dragon.pear.modules.blank.web.controller;

import com.chris.dev.base.libs.v1.http.params.IdParam;
import com.chris.dev.base.libs.v1.http.results.ValueResult;
import com.dragon.pear.modules.blank.common.utils.SampleUtil;
import com.dragon.pear.modules.blank.service.def.BlankService;
import com.dragon.pear.modules.blank.web.api.BlankApi;
import com.dragon.pear.modules.blank.web.model.param.create.TestParam;
import com.dragon.pear.modules.blank.web.model.result.TestResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Chris Chan
 * Create On 2025/8/26 下午7:10
 * Use for: 购物车 接口实现
 * Explain:
 */
@RestController
@RequestMapping("blank")
public class BlankController implements BlankApi {
    @Autowired
    private BlankService blankService;

    @Override
    public ValueResult<String> test01(@RequestBody IdParam<String> param) {
        return ValueResult.of(SampleUtil.test01());
    }

    @Override
    public TestResult test02(@RequestBody TestParam param) {
        return new TestResult(param.getCode(), param.getId(), param.getName(), param.getNum());
    }
}
